//
//  QQAgreementController.m
//  QQZF
//
//  Created by qqiMac on 2018/5/15.
//  Copyright © 2018年 com.szqqkj. All rights reserved.
//

#import "QQAgreementController.h"

@interface QQAgreementController ()
@property (nonatomic,strong)UIScrollView* scrollerV;
@property (nonatomic,strong)UIImageView* imageV;
@end

@implementation QQAgreementController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    [self initWithSubViews];
    [self initWithData];
}


-(void)initWithSubViews{
    
    self.title = @"用户协议";
    self.imageV = [[UIImageView alloc]init];
    self.scrollerV = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 64, kScreenWidth, kScreenHeight)];
    self.scrollerV.backgroundColor = [UIColor grayColor];
    self.scrollerV.showsHorizontalScrollIndicator = NO;
    self.scrollerV.showsVerticalScrollIndicator = NO;
    self.scrollerV.showsVerticalScrollIndicator = YES;
    self.scrollerV.bounces = NO;
    [self.view addSubview:self.scrollerV];
    
}

-(void)initWithData{
    UIImage* image=[UIImage imageNamed:@"actregist"];
    self.imageV.image = image;
    
    CGFloat imgH = image.size.height / (image.size.width/kScreenWidth);
    self.imageV.frame = CGRectMake(0, 0, kScreenWidth, imgH);
    
    [self.scrollerV addSubview:self.imageV];
    self.scrollerV.contentSize = CGSizeMake(0, imgH+64);
}

@end
